<template>
  <h1>Hello Vue3</h1>
  <h2>{{ obj }}</h2>
  <button @click="btn">点击</button>
</template>

<script>
import { reactive } from 'vue'
export default {
 name:'app',
 setup(){
   const obj = reactive ({
     name:'哈哈',
     age:99,
   })
   const btn = () =>{
     obj.name = '老王'
     console.log('obj改变了？' ,obj);
   }
   return {obj,btn}
 }
}
</script>

<style>

</style>